#include<iostream>
#include<sys/types.h>
#include<signal.h>

int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        std::cout<<"输入错误：./mykill signumber pid"<<std::endl;
        return 1;
    }
    int signum=std::stoi(argv[1]);//几号信号？
    pid_t target=std::stoi(argv[2]);//哪个进程？pid

    int n=kill(target,signum);
    if(n==0)
    {
        std::cout<<"send "<<signum<<" to "<<target<<" success"<<std::endl;
    }
    return 0;
}